//
//  ZJTitleWithHead.m
//  ZiJinLian
//
//  Created by lc on 2017/3/24.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "ZJTitleWithHead.h"

@implementation ZJTitleWithHead

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubview:self.image];
         [_image mas_makeConstraints:^(MASConstraintMaker *make) {
             make.width.equalTo(40);
             make.height.equalTo(40);
             make.right.equalTo(self);
             make.centerY.equalTo(self);
         }];
    }
    return self;
}
-(UIImageView *)image{
    if (_image==nil) {
        _image=[ZJUITools getCricelImageView:20];
    }
    return _image;
}
@end
